import { Component } from 'react';

import DB from '../../../app/db';

import './PageHome.less';

export default class PageHome extends Component {

 constructor(props) {
    super(props);

    let recordId = this.props.params.id;
    if (recordId == null || recordId == '' || recordId == undefined || recordId == 'undefined') {
        recordId = '';
    }

	

	this.state = {

		recordId: recordId

	}

  }

  componentDidMount(){

    var userId = getLoginUserInfo().userId;
    //alert("入会");
    var thirdMenuType = getLoginUserInfo().thirdMenuType;
    //alert(this.state.recordId);
    if(thirdMenuType=="MH"){
        var params = {
            curUserId:userId,
            applyRecordId:this.state.recordId
        }

        DB.SomeModuleAPI.getJoinQsMeetingInfo(params).then((content) => {
            //alert(content.success);
            if (content.success=="0") {
              //alert("userId:"+content.userId+" username:"+content.username+" meetingId:"+content.meetingId+" meetingCode:"+content.meetingCode);
                //全时入会
                !!emp&&emp.quanshi.openQuanshiMeeting({
                  userId:content.userId,//用户的全时账号 "7300567@zoomlion.com"
                  username:content.username,//用户名字 "张三"
                  meetingId: content.meetingId,//会议id '21312423'
                  meetingCode: content.meetingCode  //会议密码 "xxxxxx"
                });
            }

        }).catch((error) => {

        });
    }

  }

  render() {
    
    return (
        <div ></div>
      )
  }
}


